import os
import qianfan
from com.watermelon.rpa.functions import qianfan_config

'''
os.environ["QIANFAN_ACCESS_KEY"] = qianfan_config.ACCESS_KEY
os.environ["QIANFAN_SECRET_KEY"] = qianfan_config.SECRET_KEY

chat_comp = qianfan.ChatCompletion()

str = input()
resp = chat_comp.do(model="ERNIE-3.5-8K", messages=[{
    "role": "user",
    "content": str
}])
print(resp["body"]["result"])

'''

# os.environ["QIANFAN_ACCESS_KEY"] = "ALTAKvX9ucI9Dq3rpPNQJfiPig"
# os.environ["QIANFAN_SECRET_KEY"] = "f6b3bc78fa7a4dfc9a83f42683cb8fcf"
#
# chat_comp = qianfan.ChatCompletion()
#
# def chat_qianfan(prompt):
#     print(type(prompt))
#     resp = chat_comp.do(model="ERNIE-3.5-8K", messages=[{
#     "role": "user",
#     "content": prompt
#     }])
#     return resp["body"]["result"]
#
# print(chat_qianfan("衣服的质量好，价格实惠，性价比高，挺满意的一次购物体验👍👍，请帮我简要分析一下这些产品。"))


